if(typeof window.cookie==="undefined") {
	var cookie=window.cookie=new (function(){
		this.get=function(name) {
			var str = document.cookie;
			var cookieName = name + "=";
			var valueBegin = str.indexOf(cookieName);
			if (valueBegin == -1) {
				return "";
			}
			var valueEnd = str.indexOf(";", valueBegin);
			if (valueEnd == -1) {
				valueEnd = str.length;
			}
			var value = str.substring(valueBegin + cookieName.length, valueEnd);
			if (value) {
				value = decodeURIComponent(value);	
			}
			return value;
		};
		this.set=function(name, value, expires){
			var str = name + "=" + encodeURIComponent(value);
			if (expires) {
				var date = new Date();
				date.setTime(date.getTime() + expires * 1000);
				str += "; expires=" + date.toGMTString();
			}
			//str += "; path=; domain=";
			document.cookie = str;
		};
		this.del=function(name) {
			this.set(name, "", -1);
		};
	})();
}